package cn.edu.scau.cmi.lixiaoyuan.client;

import java.util.Scanner;

import cn.edu.scau.cmi.lixiaoyuan.factory.BeefMeatFactory;
import cn.edu.scau.cmi.lixiaoyuan.factory.ChickenMeatFactory;
import cn.edu.scau.cmi.lixiaoyuan.factory.MeatFactory;
import cn.edu.scau.cmi.lixiaoyuan.factory.PorkMeatFactory;
import cn.edu.scau.cmi.lixiaoyuan.simpleFactoryMethod.domain.Meat;

public class FactoryClient {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
	     String meatKind = scanner.next();
	     MeatFactory meatFactory = null;
	     switch(meatKind) {
	       case "beef": 
	    	   meatFactory=new BeefMeatFactory();
	    	   break;
			case "pork": 
				meatFactory=new PorkMeatFactory();
				break;
			case "chicken":
				meatFactory=new ChickenMeatFactory();
				break;
			default:System.out.println("sorry, no such meat to offer");
	     }
	     if(meatFactory!=null) {
	    	  Meat meat = meatFactory.getMeat();
	    	   meat.cook();
	    	   
	     }
	     scanner.close();
	}
	
     
}
